package com.example.bootintegration.dao.prod.repository;

import com.example.bootintegration.dao.test.entity.Student;
import com.example.bootintegration.dao.test.entity.StudentIdx;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

@Repository
public interface StudentRepositoryProd extends JpaRepository<Student, StudentIdx> {


    // @Transactional
    // @Modifying
    // @Query(value = "UPDATE Student set age = :age where id = :id")
    // void updateStudent(Integer id, Integer age);

    @Query(value = "select * from student where id = :id", nativeQuery = true)
    Student queryById(Integer id);
}
